package com.hhq.sso.protocol.oauth2.entity;

import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.Id;
import jakarta.persistence.Table;
import lombok.Getter;
import lombok.Setter;
import org.springframework.security.core.GrantedAuthority;

/**
 * <p>
 * Description: some description
 * </p>
 *
 * @author : xiaodong.yang
 * @date : 2024/6/18 15:07
 */
@Setter
@Getter
@Entity
@Table(name = "sso_role")
public class SsoRole implements GrantedAuthority {

    @Id
    @Column
    private String id;

    /**
     * 角色名称
     */
    private String name;

    @Override
    public String getAuthority() {
        return name;
    }
}
